home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
tptc16.zip
/
README
< prev
next >
Wrap
Text File
|
1993-01-04
|
5KB
|
131 lines
This is a PRE-RELEASE of TPC 1.5. The documentation has not been updated yet,
and there may well be serious bugs. This version has been released for
testing only and should not be redistributed.
Samuel H. Smith
The Tool Shop
(602) 279-2673
Partial documentation for prerelease version as of 8pm, 13-aug-87
--------------------------------------------
todo:
-- in var params, passing address of pointer
-- two dimensional arrays, typed constants, see test.pas
-- array[a,b...] and array[a] of array... not translated
-- process subscripted (full lvalue) for fd's in read/write
-- translate 'str' and 'val'
-- string returning procedures translated to char * return
-- string (pointer to array) var parameters translated to char *
-- pointer deref does not determine lvalue type (i.e. xxx->m should
detect string types)
-- writeln strings: 'literal',^M^J,'another'
-- nested variable sharing not proper
procedure ordering
outer local decl's not prefixed
-- variant records not translated
-- untyped parameter variables
-- absolute variables
manual translations:
-- nested procedure ordering
-- atoi macro clash ?
changes
-- turbo-c procedure declaration syntax
-- arrays subscripted by enumeration types
-- fails to handle null else clause in case statement
-- include intermediate cases in swith() .. case x..y
-- pointer/var parameter translation *id.mem should be id->mem
-- pointer/var parameter translation *id[n] should be id[n]
-- concat(...)+char and string+char not detected as string/character
concat operation.
-- detect concat(concat... and replace with a sprintf variant
-- changed sprintf calls to sbld calls to preserve sources during build
-- pos(c,str) and pos(str,str) are now separately translated
-- added 'base' to symbol table; use to add base-subscript offset
in all subscript references.
-- moved typename translations to tpcmac.h header
-- fixed bug in non-translation of tshell directives
-- forward pointer declarations
-- translate inline into asm statements
-- complete forward translation
---------------
13-oct-87
-- improved string and array parameter translations
-- string returns are now translated into char *
15-oct-87
-- corrected error in typed constant translation where nested
records are initialized.
-- variant record declarations are translated into unions
but no variant expression translations are done.
-- changed nested procedure error messages to include procedure name.
(*
*
* TPC - Turbo Pascal to C translator
*
* S.H.Smith, 9/9/85 (rev. 13/8/87)
*
* Copyright 1986, 1987 by Samuel H. Smith; All rights reserved.
*
*
* Revision history
* ----------------
*
* 09/09/85 v0.0 (paspp)
* Initial coding by Samuel H. Smith. Never released.
*
* 12/19/86 v1.0
* First distributed as TPC10 under shareware concept.
*
* 04/15/87 v1.1
* Corrected handling of unary minus.
* Improved error messages; added error messages to object file.
* Added handler for integer subrange types.
* Added handling for goto statement and numeric labels.
* The macro header, tpcmac.h, now contains more declarations.
* Distributed as TPC11.
*
* 04/22/87 v1.2
* Corrected an error that led to a crash on lines with more than 40
* leading spaces. Distributed as TPC12.
*
* 05/20/87 v1.3
* Added support for pascal/MT+: external procedures and variables,
* special write/read indirect syntax, & and ! operators,
* default string size for string declarations.
* Distributed as TPC13.
*
* 05/26/87 v1.4
* Additional support for pascal/MT+. The translator "shifts" into a
* MT+ specific mode when it recognizes the 'MODULE' statement.
* The '|' operator is recognized for bitwise OR.
* The '\', '?' and '~' operators are all translated into a unary
* not (is this right, Noam?).
* Read(ln) and Write(ln) now support the special case of "[]" for the
* I/O routine.
* Long integer literals are translated from '#nnn' to 'nnnL'
*
* 06/01/87 v1.5
* Added new 2nd-line parser.
* Added -lower option to map identifiers to lower case.
* Added -mt option to force pascal/mt+ mode.
* Added partial var-parameter translation.
* Mem, MemW, Port and PortW are all translated into Turbo C.
* Turbo-c procedure declaration syntax is now used.
* Arrays may now be subscripted by enumeration types.
* Null else clause now handled properly in IF and CASE statements.
* For .. downto is now translated correctly.
* The VAL..VAL form is now translated in case statements.
*
*)